package com.ruoyi.preferential.service.impl;

import java.util.List;

import com.ruoyi.preferential.domain.SyPreferential;
import com.ruoyi.preferential.mapper.SyPreferentialMapper;
import com.ruoyi.preferential.service.ISyPreferentialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 优惠卷Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-23
 */
@Service
public class SyPreferentialServiceImpl implements ISyPreferentialService
{
    @Autowired
    private SyPreferentialMapper syPreferentialMapper;

    /**
     * 查询优惠卷
     * 
     * @param id 优惠卷主键
     * @return 优惠卷
     */
    @Override
    public SyPreferential selectSyPreferentialById(Long id)
    {
        return syPreferentialMapper.selectSyPreferentialById(id);
    }

    /**
     * 查询优惠卷列表
     * 
     * @param syPreferential 优惠卷
     * @return 优惠卷
     */
    @Override
    public List<SyPreferential> selectSyPreferentialList(SyPreferential syPreferential)
    {
        return syPreferentialMapper.selectSyPreferentialList(syPreferential);
    }

    /**
     * 新增优惠卷
     * 
     * @param syPreferential 优惠卷
     * @return 结果
     */
    @Override
    public int insertSyPreferential(SyPreferential syPreferential)
    {
        return syPreferentialMapper.insertSyPreferential(syPreferential);
    }

    /**
     * 修改优惠卷
     * 
     * @param syPreferential 优惠卷
     * @return 结果
     */
    @Override
    public int updateSyPreferential(SyPreferential syPreferential)
    {
        return syPreferentialMapper.updateSyPreferential(syPreferential);
    }

    /**
     * 批量删除优惠卷
     * 
     * @param ids 需要删除的优惠卷主键
     * @return 结果
     */
    @Override
    public int deleteSyPreferentialByIds(Long[] ids)
    {
        return syPreferentialMapper.deleteSyPreferentialByIds(ids);
    }

    /**
     * 删除优惠卷信息
     * 
     * @param id 优惠卷主键
     * @return 结果
     */
    @Override
    public int deleteSyPreferentialById(Long id)
    {
        return syPreferentialMapper.deleteSyPreferentialById(id);
    }
}
